//
// CPSCollisionInfo.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CVector;

public class CPSCollisionInfo {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CPSCollisionInfo(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CPSCollisionInfo obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CPSCollisionInfo(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void setNext(CPSCollisionInfo value) {
    nel3dJNI.CPSCollisionInfo_Next_set(swigCPtr, this, CPSCollisionInfo.getCPtr(value), value);
  }

  public CPSCollisionInfo getNext() {
    long cPtr = nel3dJNI.CPSCollisionInfo_Next_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CPSCollisionInfo(cPtr, false);
  }

  public void setDist(float value) {
    nel3dJNI.CPSCollisionInfo_Dist_set(swigCPtr, this, value);
  }

  public float getDist() {
    return nel3dJNI.CPSCollisionInfo_Dist_get(swigCPtr, this);
  }

  public void setNewPos(CVector value) {
    nel3dJNI.CPSCollisionInfo_NewPos_set(swigCPtr, this, CVector.getCPtr(value), value);
  }

  public CVector getNewPos() {
    long cPtr = nel3dJNI.CPSCollisionInfo_NewPos_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CVector(cPtr, false);
  }

  public void setNewSpeed(CVector value) {
    nel3dJNI.CPSCollisionInfo_NewSpeed_set(swigCPtr, this, CVector.getCPtr(value), value);
  }

  public CVector getNewSpeed() {
    long cPtr = nel3dJNI.CPSCollisionInfo_NewSpeed_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CVector(cPtr, false);
  }

  public void setCollisionZone(CPSZone value) {
    nel3dJNI.CPSCollisionInfo_CollisionZone_set(swigCPtr, this, CPSZone.getCPtr(value), value);
  }

  public CPSZone getCollisionZone() {
    long cPtr = nel3dJNI.CPSCollisionInfo_CollisionZone_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CPSZone(cPtr, false);
  }

  public void setIndex(long value) {
    nel3dJNI.CPSCollisionInfo_Index_set(swigCPtr, this, value);
  }

  public long getIndex() {
    return nel3dJNI.CPSCollisionInfo_Index_get(swigCPtr, this);
  }

  public CPSCollisionInfo() {
    this(nel3dJNI.new_CPSCollisionInfo(), true);
  }

  public void update(CPSCollisionInfo other) {
    nel3dJNI.CPSCollisionInfo_update(swigCPtr, this, CPSCollisionInfo.getCPtr(other), other);
  }

}
